package cn.smile.controller.exception;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.NoHandlerFoundException;

/**
 * 全局异常处理配置
 *
 * @Author: MaoSuyu
 * @User：John
 * @Date: 2019/5/17
 * @Time: 15:04
 * @Description: No Description
 */
@RestControllerAdvice
public class GlobalExceptionController {

    /**
     * 404
     *
     * @return
     */
    @ExceptionHandler(Exception.class)
    public Exception handlerException(Exception e) {
        return e;
    }

}
